package com.rongxue.service.Impl;

import com.rongxue.mapper.SareaMapper;
import com.rongxue.pojo.Sarea;
import com.rongxue.service.SareaService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by 王显锋 on 2018/8/2.
 */
@Service
public class SareaServiceImpl implements SareaService {
    private static Logger logger = LoggerFactory.getLogger(SareaServiceImpl.class);
    @Autowired
    private SareaMapper sareaMapper;

    @Override
    public List<Sarea> selectSareaList() {
        List<Sarea> sareas = sareaMapper.querySeare(1);
        for (Sarea sarea : sareas) {
            sareaMapper.querySeare(sarea.getProvinceId());
        }
        return sareas;
    }
}
